<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>订单中心</title>
    <link rel="stylesheet" th:href="@{/static/before/css/style.css}"/>
    <style>
        .fuka{
            width: 200px;
            height: 50px;
            color: #fff;
            background: rgb(255, 103, 0);
            font-size: 20px;
            border: none;
            cursor: pointer;
            float: right;
        }
        .name {
            font-size: 20px;
            font-weight: bold;
        }


        .num {
            font-size: 18px;
        }
        td{
            width: 400px;
            height: 100px;
        }
        :hover .address{
            color: orangered;
        }

    </style>
    <script th:src="@{/webjars/jquery/2.1.3/jquery.js}" type="text/javascript"></script>
</head>
<body>
<div th:insert="before/header :: header"></div>
<div th:insert="before/header02 :: header02"></div>
<div class="grzxbj">
    <div class="selfinfo center" style="position: relative;left: 10%">
        <div class="rtcont">
            <select class="ddzxbt" id="chooseaddress">
                <option value="0" selected="selected">-- 请选择地址 --</option>
            </select>
            <div class="ddzxbt">订单中心
                <a th:href="@{/user-address}" class="adress" id="address" style="font-size: 17px;color:dimgray;">更改收货信息</a></div>

                <table  style="text-align: center">
                    <tr>
                        <td>
                            <a class="al num">商品</a>
                        </td>
                        <td>
                            <a class="al num">订单号</a>
                        </td>
                        <td>
                            <a class="al">类型</a>
                        </td>
                        <td>
                            <a class="al">颜色</a>
                        </td>
                        <td>
                            <a class="al">价格</a>
                        </td>
                        <td>
                            <a class="al">数量</a>
                        </td>
<!--                        <td>-->
<!--                            <a class="al">操作</a>-->
<!--                        </td>-->
                    </tr>
                    <tr th:each="carli:${shoppingcars}">
                        <td>
                            <a class="al" th:text="${carli.gname}">商品名</a>
                        </td>
                        <td>
                            <a class="al num" th:text="${random}"></a>
                        </td>
                        <td>
                            <a class="al" th:text="${carli.gtypename}"></a>
                        </td>
                        <td>
                            <a class="al" th:text="${carli.gcolorname}"></a>
                        </td>
                        <td>
                            <a class="al" th:text="${carli.price}+'元'"></a>
                        </td>
                        <td>
                            <a class="al" th:text="${carli.count}"></a>
                        </td>
<!--                        <td>-->
<!--                            <a class="al" href="#" style="color: orangered">确认付款</a>-->
<!--                        </td>-->
                    </tr>
                </table>

            </div>
    </div>
    <hr />
    <div class="jiesuandan mt20 center">
        <div class="tishi fl ml20">
            <ul>
                <li><a href="/index">继续购物</a></li>
                <li>|</li>
                <li>共<span id="countgoods" th:text="${counts}">2</span>件商品</li>
                <div class="clear"></div>
            </ul>
        </div>
        <div class="jiesuan fr">
            <div class="jiesuanjiage fl">合计（不含运费）：<span id="totals" th:text="${total}">2499.00元</span></div>
            <form id="123" action="/alipay" method="post">
            <input type="hidden"  name="price" th:value="${total}">
            <input type="hidden"  name="random" th:value="${random}">
            <td>
                <input type="submit"  class="fuka" value="确认付款"></input>
            </td>
        </form>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>
</div>
<div class="clear "></div>
<div style="position: relative;top: 50px" th:insert="before/footer :: footer"></div>
</body>
</html>
<script type="text/javascript">
    $(function(){
        $.ajax({
            "url": "/loadAddress",
            "dataType":"JSON",
            "type": "get",
            "success": function(result) {
                $('#chooseaddress option').remove();
                $('#chooseaddress').append("<option value='0' selected='selected'>-- 请选择 --</option>");
                for(var i in result) {
                    $('#chooseaddress').append("<option  value='" + result[i].addId + "'>" + result[i].address1 + "</option>")
                }
            }
        });
    });
</script>